﻿/// <reference path="../../../Scripts/jquery-1.7.2.min.js" />
/// <reference path="jquery.dataTables.min.js" />

$(document).ready(function () {
	var oTable = $('#dprDataTable').dataTable({
		"bServerSide": true,
		"bJQueryUI": true,
		"sScrollX": "100%",
		"sScrollXInner": "110%",
		"bScrollCollapse": true,
		"bAutoWidth": false,
		"sAjaxSource": "Dpr/AjaxHandler",
		"bProcessing": true,
		"oLanguage": {
			"sSearch": " "
		},
		"aoColumns": [
						{ "sName": "ID",
							"bSearchable": false,
							"bSortable": false,
							"fnRender": function (oObj) {
								return '<a href=\"dpr/Edit/' + oObj.aData[0] + '\" class="edit">Edit</a> ';
							}
						},
						{ "sName": "Date" },
                        { "sName": "Hour" },
						{ "sName": "PoNo" },
						{ "sName": "StyleNo" },
						{ "sName": "Floor" },
						{ "sName": "Line" },
						{ "sName": "Cutting" },
                        { "sName": "SewingInput" },
						{ "sName": "TodaySewing" },
						{ "sName": "SentPrintEmb" },
						{ "sName": "ReceivedPrintEmb" },
						{ "sName": "SentWash" },
						{ "sName": "ReceivedWash" },
						{ "sName": "TodayFinish" },
						{ "sName": "TodaySewingTarget" }
					]
		});

		$(window).bind('resize', function () {
			oTable.fnAdjustColumnSizing();
		});
});